package com.bdqn.zhao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bdqn.zhao.dao.EpSignupMapper;
import com.bdqn.zhao.pojo.EpSignup;
import com.bdqn.zhao.service.EpSignupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EpSignupServiceimpl extends ServiceImpl<EpSignupMapper, EpSignup> implements EpSignupService {
    @Autowired
    private  EpSignupMapper epSignupMapper;
    @Override
    public List<EpSignup> SelAllJ(String epsi_applyfor, String epsi_iphone){
        QueryWrapper<EpSignup> queryWrapper=new QueryWrapper<>();
        List<EpSignup> epSignups;
        if (true){
            if (epsi_applyfor!=null&& epsi_applyfor!=""){
                queryWrapper.eq("epsi_applyfor",epsi_applyfor);
            }
            if (epsi_iphone!=null&& epsi_iphone!=""){
                queryWrapper.eq("epsi_iphone",epsi_iphone);
            }
        epSignups = epSignupMapper.selectList(queryWrapper);
        }else{
            epSignups = epSignupMapper.selectList(null);
        }
        return epSignups;
    }
}
